﻿using Company.Application.Share.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Application.Share.Interfaces
{
    public interface IWebManager
    {
        /// <summary>
        /// 用户登录 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="username">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        Task<T> LoginAsync<T>(string username, string password,int hospitalId);

        /// <summary>
        /// 按关键字搜索医院
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="keyword"></param>
        /// <returns></returns>
        Task<T> GetHospitalsAsync<T>(string keyword);
        /// <summary>
        /// 获取当前医院下面所有站点数据
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="HospitalId"></param>
        /// <returns></returns>
        Task<T> GetStationsAsync<T>(int HospitalId);
        /// <summary>
        /// 获取当前医院下面某个站点的所有设备
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="hospitalId"></param>
        /// <param name="stationId"></param>
        /// <returns></returns>
        Task<T> GetDevicesAsync<T>(int hospitalId, int stationId);
        /// <summary>
        /// 更新设备连接信息
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<T> UpdateAsync<T>(DeviceEntity entity);

    }
}
